PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUSetRunStyle

Assigns or updates style runs.

OSStatus ATSUSetRunStyle (
                     ATSUTextLayout iTextLayout,
                     ATSUStyle iStyle,
                     UniCharArrayOffset iRunStart,
                     UniCharCount iRunLength);
iTextLayout
A reference of type ATSUTextLayout. Pass a reference to a valid text layout object.

iStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose attributes, font features, and font variations you want to set (if uninitialized) or replace (if initialized). You cannot pass NULL for this parameter.

iRunStart
A value of type UniCharArrayOffset. Pass the edge offset of the beginning of the style run whose attributes, font features, and font variations you want to set (if uninitialized) or replace (if initialized).

iRunLength
A value of type UniCharCount. Pass the length of the style run whose attributes, font features, and font variations you want to set (if uninitialized) or replace (if initialized).

function result
A result code. See Result Codes.
DISCUSSION
The ATSUSetRunStyle function assigns new style runs or updates existing style runs. For uninitialized text layout objects, ATSUSetRunStyle assigns new style runs; for initialized text layout objects, it updates replaces all previously set attributes, font features, and font variations in the iStyle parameter. After completion, ATSUSetRunStyle adjusts the lengths of the style runs on either side of the new or updated style run.

If the user deletes, inserts, or moves text in a text layout object and the range of text covers the entire text buffer, you should

You can then call the function ATSUDrawText to display the updated text.

SPECIAL CONSIDERATIONS
You are responsible for disposing of the memory allocated for the new style run when you dispose of it. Calling the function ATSUDisposeTextLayout will not do so. ATSUSetRunStyle may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)